package com.imooc;

public class ArrayDemo {

	public static void main(String[] args) {
		ArrayDemo ad = new ArrayDemo();
		int[] a1 = {1,2,3,4,5};
		System.out.println("方法调用前数组a的元素：");
		for(int n:a1) {
			System.out.print(n);
		}
		ad.updateArray(a1);
		System.out.println("方法调用后数组a的元素：");
		for(int n:a1) {
			System.out.print(n);
		}
	}
	
	public void updateArray(int[] a) {
		a[3] = 15;
		System.out.println();
	}
}
